docs: migrate to @sentry/starlight-theme#996
Conversation
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 4235 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.86% 81.86% —%
==========================================
Files 328 328 —
Lines 23349 23349 —
Branches 15114 15114 —
==========================================
+ Hits 19115 19114 -1
- Misses 4234 4235 +1
- Partials 1620 1620 —Generated by Codecov Action |
|
d272db4 to
ebadf59
Compare
| import { codeToTokens } from 'shiki'; | ||
| import { monochromeCodeTheme } from '@sentry/starlight-theme'; | ||
|
|
||
| interface InstallOption { | ||
| label: string; |
There was a problem hiding this comment.
Bug: A shiki version mismatch in InstallSelector.astro may cause syntax-highlighted text to render as invisible due to an incompatible theme object from a v4-based package.
Severity: MEDIUM
Suggested Fix
To resolve the version mismatch, either upgrade the top-level shiki dependency in package.json to a shiki v4 compatible version, or ensure the monochromeCodeTheme object is backwards-compatible with shiki v3's codeToTokens API.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: docs/src/components/InstallSelector.astro#L2-L6
Potential issue: In `InstallSelector.astro`, the `codeToTokens` function is imported
from the top-level `shiki` dependency (v3.21.0), but it is called with
`monochromeCodeTheme`, a theme object from `@sentry/starlight-theme` which is designed
for `shiki` v4. This version mismatch may cause the `codeToTokens` function to return
tokens where the `color` property is `undefined`. As a result, the component will render
invisible text for the install commands on the homepage, as the style will be set to
`color: undefined`.
Did we get this right? 👍 / 👎 to inform future reviews.
…ttribution (#392) Extend `github-code` from a GitHub CLI command reference into a compact repo-edit and PR workflow skill. Folds in the high-value behavioral rules from `code-change` (junior-prod) that were previously buried in reference files the model wasn't reliably loading (see getsentry/cli#996 for the attribution miss that motivated this). **On-behalf-of attribution is inline, not in references** `Co-authored-by` trailers, `Action taken on behalf of Full Name.` footer, and session link are all in the main SKILL.md workflow steps where the model can't miss them. **Investigation and verification discipline added** Read referenced context, inspect real product/UI context before inventing content, know failure shape before editing bugs, re-root-cause after failed fixes. Choose a validation path before editing (scoped checks > targeted tests > full suites). Capture baselines for risky work. Separate pre-existing failures from regressions. **Edit discipline added** Keep public surfaces minimal, remove duplication introduced by the change, solve the behavior not just the tests. Compact checklist for multi-step work. Pause-and-plan for non-obvious architecture/security/concurrency work. **Commit and PR conventions inline** `type(scope): Subject` format, footer ordering, line length, draft PRs by default, reviewer-facing prose, handle resolution before assignment. **api-surface.md expanded** Added git commands for branch, status, log, diff, commit. Defaulted PR creation to `--draft`. **Intentionally not included** Full advisor protocol (orchestration-level, not GitHub ops), `diff-quality` gate (separate skill), exhaustive verification harness table (conditional detail better as progressive disclosure), multi-viewport screenshot protocol. Refs getsentry/cli#996 Action taken on behalf of David Cramer. --- [View Session in Sentry](https://sentry.sentry.io/traces/?project=4510944073809921&query=gen_ai.conversation.id%3A%22slack%3AC0B595QDZLL%3A1779338726.095499%22) Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <david@sentry.io>
Replace the 1900-line custom dark theme CSS and hand-rolled component overrides with the shared @sentry/starlight-theme Starlight plugin. Changes: - Add @sentry/starlight-theme dependency and plugin to astro config - Use monochromeCodeTheme for syntax highlighting (replaces github-dark) - Bump @astrojs/starlight to ^0.39.2 (theme peer dep) - Remove custom ThemeProvider, ThemeSelect, Header components (now provided by the shared theme) - Remove CodeBlock, CommandBox (unused) - Replace 1869-line custom.css with ~250-line cli.css containing only CLI-specific styles (splash page, feature sections, overscroll) - Update font references in components to use CSS custom properties - Update InstallSelector to use shared monochrome code theme - Use theme design tokens (--ve-*) in PageTitle
- Re-add custom Header component (derived from theme's Header pattern) with CLI-specific features: homepage detection, 'Docs' nav link, hide search on splash page, social icons in header - Restore the purple/blue ambient gradient glow (.main-frame::before) - Style social icons white in header
The shared theme's --sl-content-width (50rem/800px) is too narrow for the splash page feature sections which use side-by-side layouts with wide ASCII terminal art. The terminal tables blow out the flex layout and crush the text column to near-zero width. Fix: - Widen the splash page container to 68rem (~1088px) matching production - Add overflow: hidden + min-width: 0 on .feature-visual to prevent terminal content from expanding the flex item beyond 55%
1. Header: on docs pages, use the theme's standard header (text title + search) instead of the branded logo header. The homepage keeps the logo + 'Docs' link + GitHub icon. Removed replacesTitle so docs pages show 'Sentry CLI' as text, not the logo SVG. 2. Tabs: updated PackageManagerCode tabs from underline-style to the theme's pill-style (rounded, purple accent background on active tab) to match Starlight tab styling from @sentry/starlight-theme.
Header: - Removed logo from Starlight config entirely (no longer shows on any page by default) - Homepage Header renders the logo SVG manually via an img tag - Docs pages show plain text 'Sentry CLI' title with search — no logo Code blocks: - PackageManagerCode code area bg changed from hardcoded #0a0a0f to var(--ve-code-bg) to match the theme's code block background
Code blocks: - Bumped @sentry/starlight-theme from ^0.2.0 to ^0.3.0 — v0.2.0 had --ve-code-bg: #111 which made code blocks darker than intended. v0.3.0 uses #141419, matching the theme playground reference. Homepage header: - Removed the 'Sentry CLI' text from the homepage header — now shows just the wordmark SVG logo like production does. The text next to the logo icon looked redundant.
4ba6c97 to
b8a62ea
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b8a62ea. Configure here.

Summary
Migrate the CLI docs site from a custom 1900-line dark theme to the shared
@sentry/starlight-themepackage.Changes
Added
@sentry/starlight-theme— shared Starlight plugin with dark-only theme, component overrides (Header, Footer, ThemeSelect, Pagination), and monochrome code highlightingdocs/src/styles/cli.css— slim (~250 lines) of CLI-specific styles (splash page, feature sections, overscroll easter egg)Removed
docs/src/styles/custom.css— 1869 lines of custom dark theme CSS (now provided by the shared theme)docs/src/components/ThemeProvider.astro— dark-mode forcing (theme handles this)docs/src/components/ThemeSelect.astro— empty theme select (theme handles this)docs/src/components/Header.astro— custom header (theme provides its own)docs/src/components/CodeBlock.astro— unuseddocs/src/components/CommandBox.astro— unused (imported but never rendered)expressiveCodeconfig withgithub-darkthemeUpdated
astro.config.mjs— usessentryStarlightTheme()plugin andmonochromeCodeTheme@astrojs/starlightbumped to^0.39.2(theme peer dependency)astrobumped to^6.3.5InstallSelector.astro— uses monochrome theme instead ofgithub-darkfor Shiki highlighting'JetBrains Mono'tovar(--sl-font-mono)PageTitle.astro— uses theme design tokens (--ve-*)Kept (CLI-specific)
InstallSelector,PackageManagerCode,Terminal,FeatureTerminal,FeatureVisual,PageTitlecomponents@sentry/astrointegration and sourcemap configVisual changes expected
github-darkto monochrome (shared theme)#0a0a0fbackground, same#8b5cf6purple accent)Notes
bun.lock) needs regeneration after merging — runcd docs && bun install